package com.gyf.crm.web.controller;

import com.gyf.crm.model.MonthIncome;
import com.gyf.crm.service.ICourseOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 数据分析
 */
@Controller
@RequestMapping("dataanalysis")
public class DataAnalysis {

    @Autowired
    private ICourseOrderService orderService;
    @RequestMapping("list")
    public String list(){
        return "dataanalysis/list";
    }

    @RequestMapping("monthincomes")
    @ResponseBody
    public List<MonthIncome> monthIncomes(){
        return orderService.getMonthIncomes();
    }
}
